If/Else - single condition
This sample JavaScript or Groovy custom scripting function maps the shipping contact if available, otherwise defaults to the billing contact.
| Inputs | - billToContact (Character) - shipToContact (Character) |
| Outputs | - contact |
Script
if (shipToContact != "") {
contact = shipToContact;
} else {
contact = billToContact;
}